﻿#region DESCRIPTION
// 
//Date, Title, Descptn, etc....
//
#endregion DESCRIPTION



#region USING
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

using BrickBreaker.Core;
using Hud;
using System.Collections.Generic;
#endregion USING


namespace BrickBreaker.Gameplay
{
    public abstract class BBLevelStencil : BBILevel
    {
        #region DATA_MEMBERS
        //
        protected BBBackground background1;     //V0--: Level BG
        protected BBBackground track;           //V0--: Track that the Paddle will roll on

        protected BBPaddle paddle;              //V0--: Load a Paddle Obj into Game World
        //protected BBBall ball;
        protected List<BBBall> balls;           //V0--: Load Ball Obj(s) into Game World
        protected BBBrickManager bricks;        //V0--: Load Brick Objs into Game World

        protected List<BBProjectile> bullets;   //V0--: Track all bullets in the game
        //protected BBHud hud;

        protected bool isPaused;                //V0--: Used to Trigger Pause
        protected bool checkCollision;          //V0--: Set TRUE, if Game is Launched
        //protected bool isActive;              //V0--: Activate, if level is selected to Load
        //
        #endregion DATA_MEMBERS


        #region PROPERTIES
        //
        /// <summary>
        /// Child Level can override this Property
        /// Returns GET/SET Access to Pause the game
        /// </summary>
        public virtual bool Paused
        {
            get { return this.isPaused; }
            set { this.isPaused = value; }
        }

        public virtual int BricksLeft
        {
            get { return this.bricks.BricksLeft; }
        }
        
        /// <summary>
        /// Child Level can override this Property
        /// Returns Read-Only Access to 'bricks.AllDestroyed()'
        /// </summary>
        public virtual bool LevelCompleted 
        {
            get { return this.bricks.AllDestroyed; }
        }
        //
        #endregion PROPERTIES


        #region ABSTRACT_METHODS
        //
        //////////////////////////////////////////////////////////////////////////
        // Abstract methods that each child Level must implement.
        //////////////////////////////////////////////////////////////////////////

        /// <summary>
        /// Child Level Must implement this Method
        /// Instantiate all objects inside this method
        /// </summary>
        public abstract void LoadContent();

        /// <summary>
        /// Child Level Must implement this Method
        /// Unload all Level objects inside this method
        /// </summary>
        public abstract void UnloadContent();
        
        /// <summary>
        /// Child Level Must implement this Method
        /// Reset all/any obj(s) properties, states, etc inside this method
        /// </summary>
        public abstract void Reset();
        
        /// <summary>
        /// Child Level Must implement this Method
        /// All obj(s) updates should be called inside this method
        /// </summary>
        public abstract void Update(GameTime gameTime);

        /// <summary>
        /// Child Level Must implement this Method
        /// All obj(s) that need to be rendered to the screen should be called inside this method
        /// </summary>
        public abstract void Draw(SpriteBatch spriteBatch);
        //
        #endregion ABSTRACT_METHODS

    }//end class
}//end namespace
